﻿
<div class="panel panel-default padding-empty">
    <div class="panel-body padding-empty">
        <ol class="breadcrumb margin-empty">
            <li class="breadcrumb-color"><i class="fa fa-home"></i>&nbsp;主页</li>
            <li><a href="#/examReport/planList" class="breadcrumb-link">考试结果管理</a></li>
            <li class="active">{{subjectName}} - 随考结果管理</li>
        </ol>
    </div>
</div>

<div class="panel panel-default">
    <!--<div class="panel-heading">
        <h3>
            <i class="fa fa-desktop"></i>
            {{planName}} - 考试结果管理

            &nbsp;
            <button class="btn btn-turquoise btn-xs" onclick="javascript:history.go(-1);" title="返回上一页" style="margin-bottom: 0;">
                <i class="fa fa-chevron-left"></i>
            </button>
        </h3>

        <div class="panel-options">
        </div>
    </div>-->

    <div class="panel-body">
        <!--下拉框搜素-->
        <form class="form-inline pull-left" style="margin-bottom:10px;">
            <!--<div class="form-group">
                <label class="control-label">科目：</label>
                <select ng-model="curSubject" ng-options="item.subjectName for item in subjectList" class="form-control selectMaxWidth"></select>
            </div>-->

            <div class="form-group">
                <input ng-model="curParams" class="form-control selectMaxWidth" maxlength="30" placeholder="准考证或姓名" />
            </div>

            &nbsp;
            &nbsp;

            <button class="btn btn-turquoise" ng-click="query();" style="margin-bottom: 0;">
                <i class="fa fa-search"></i>
                搜索
            </button>
        </form>

        <!--<form class="form-inline pull-right">
            <button class="btn btn-turquoise" ng-click="signInReport();" ng-disabled="loadingState">
                <i class="fa fa-file-text-o"></i>
                签到报告
            </button>
            <button class="btn btn-turquoise" ng-click="build();" ng-disabled="loadingState">
                <i class="fa fa-spinner fa-spin" ng-show="loadingState"></i>
                <i class="fa fa-briefcase" ng-hide="loadingState"></i>
                生成
            </button>
            <button class="btn btn-turquoise" ng-click="generated();">
                <i class="fa fa-history"></i>
                查看已生成
            </button>
        </form>-->

        <br />
        <table class="table responsive table-bordered table-hover table-condensed">
            <thead>
                <tr class="active">
                    <th class="text-center">
                        <input type="checkbox" ng-click="checkAll();" title="全选" ng-disabled="loadingState" />
                    </th>
                    <th class="text-center">#</th>
                    <th>科目</th>
                    <th>学生姓名</th>
                    <th>准考证号</th>
                    <th>完成时间</th>
                    <th>完成状态</th>
                    <th>数据来源</th>
                    <th>备注</th>
                    <th>理由</th>
                </tr>
            </thead>
            <tbody ng-repeat="item in list" ng-click="check(item);" style="cursor: pointer;">
                <tr>
                    <td class="text-center" rowspan="{{list[$index].behavior.length}}">
                        <input type="checkbox" id="cbxSubject_{{item.examSubjectID}}_{{item.examineeID}}" value="{{item.examSubjectID}},{{item.examineeID}}" ng-click="check(item);" ng-disabled="{{item.accountType}}" />
                    </td>
                    <!--序号-->
                    <td class="text-center" rowspan="{{list[$index].behavior.length}}">
                        {{$index+1}}
                    </td>
                    <!--科目-->
                    <td rowspan="{{list[$index].behavior.length}}" title="{{item.examSubjectName}}">
                        {{item.examSubjectName | formatLongStr}}
                    </td>
                    <!--学生姓名-->
                    <td rowspan="{{list[$index].behavior.length}}">
                        {{item.examineeName}}
                    </td>
                    <!--准考证号-->
                    <td rowspan="{{list[$index].behavior.length}}">
                        {{item.examCardNo}}
                    </td>
                    <!--完成时间-->
                    <td rowspan="{{list[$index].behavior.length}}" ng-switch on="item.sysState">
                        <span ng-switch-default></span>
                        <span ng-switch-when="3">{{item.examEndTime | formatDate | date: 'yyyy-MM-dd HH:mm:ss'}}</span>
                    </td>
                    <!--完成状态-->
                    <td rowspan="{{list[$index].behavior.length}}" ng-switch on="item.sysState">
                        <span ng-switch-default>异常状态</span>
                        <span ng-switch-when="0">未开考</span>
                        <span ng-switch-when="1">已登录</span>
                        <span ng-switch-when="2">已开考未交卷</span>
                        <span ng-switch-when="3">已交卷</span>
                        <span ng-switch-when="4">作废</span>
                        <span ng-switch-when="5">试卷下载完成</span>
                        <span ng-switch-when="6">意外处理作废</span>
                    </td>
                    <!--数据来源-->
                    <td rowspan="{{list[$index].behavior.length}}" ng-switch on="item.accountType">
                        <span ng-switch-when="0">考务</span>
                        <span ng-switch-when="1">本地生成</span>
                    </td>
                    <!--备注-->
                    <td><span style="display:block;min-height:20px;">{{item.behavior[0].memo}}</span></td>
                    <!--理由-->
                    <td><span style="display:block;min-height:20px;">{{item.behavior[0].reason}}</span></td>
                </tr>
                <tr ng-repeat="subItem in item.behavior|formatUnFirst:1">
                    <td>
                        {{subItem.memo}}
                    </td>
                    <td>
                        {{subItem.reason}}
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div role="tabpanel" class="tab-pane active" ng-if="list.length <= 0">
        <h3 class="text-center">
            <img src="//openexamcdn.open.com.cn/openexam/static/App/images/nodata.jpg" alt="" />
            <!--<small>对不起，没有相关数据！</small>-->
        </h3>
    </div>
</div>
